function on_timer_second(seconds)
    return 0
end

function loadrandom()
    math.randomseed(os.time())
    math.random(1,10000)
end

print("UMNODE version 1.0")
print("==================")
loadrandom()
print("server ip:")
print("------------------")
hostname = nil
for k,v in pairs(umc.network_info()) do
    print(v.ipv4)
    if (hostname == nil and v.ipv4~='0.0.0.0') then
        hostname = v.ipv4
    end
end

if hostname==nil then 
    hostname='localhost' 
end
os.execute("start https://"..hostname..":10508/index.html")
print("==================")
